<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function f12(num){
        console.log('1.异步编程之回调函数');
        console.log(num +1);
    };
    function f11(arr,callback){
        var total=arr.reduce(function (a,b,index,arr) {
            return a+b;
        });
        return callback && callback(total);
    };
    f11([1,2,3,4,5],f12);
</script>

</body>
</html>